package com.swak.devtools.apidoc.parse;

import java.util.List;

import com.swak.utils.Lists;

import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class ApiClass {
	private String name;
	private String desc;
	private String example;
	private List<ApiField> apiFields;
	private List<ApiMethod> apiMethods;

	public ApiClass addField(ApiField field) {
		if (apiFields == null) {
			apiFields = Lists.newArrayList();
		}
		apiFields.add(field);
		return this;
	}

	public ApiClass addMethod(ApiMethod method) {
		if (apiMethods == null) {
			apiMethods = Lists.newArrayList();
		}
		apiMethods.add(method);
		return this;
	}
}
